<?php

namespace App\Http\Controllers\admin;

use App\Dao\OrdersDao;
use App\Services\Code;

class OrdersController extends BaseController
{
    public function orders()
    {
        if(getIsHasPage()){
            $params = request()->all();
            return  Code::message('',200,OrdersDao::pageinate($params));
        }
        return view('admin.orders.orders');
    }

    public function orders_no_page()
    {
        $params = request()->all();
        return  Code::message('',200,OrdersDao::orders_no_page($params));

    }


    public function send_huo()
    {
        if(isPost()){
            $params = request()->all();
            OrdersDao::send_huo($params);
            return  Code::message('',200);
        }
        return view('admin.orders.send_huo',[
            'order_id'=>request('order_id')
        ]);
    }
}
